/**
 * @Date: Feb 26, 2010 1:29:29 PM
 */
package com.philip.journal.core.dao;

import java.util.HashMap;
import java.util.Map;

import com.philip.journal.core.bean.User;
import com.philip.journal.core.exception.JournalException;

/**
 * RTFC.
 *
 * @author cry30
 */
public class UserDAOImpl extends BaseDAOImpl<User> implements UserDAO {

    @Override
    public User readByUsername(final String username)
    {
        final Map<String, Object> param = new HashMap<String, Object>();
        param.put("username", username);
        User user = null;
        try {
            user = readObject(param);
        } catch (final Exception e) {
            throw new JournalException(e.getMessage(), e);
        }
        return user;
    }

}
